(global.webpackJsonp = global.webpackJsonp || []).push([ [ "xg_o2o/xgadmin/admin_creditorder_detail" ], {
    a71b: function(e, t, n) {
        "use strict";
        n.r(t);
        var i = n("a84c"), o = n.n(i);
        for (var r in i) "default" !== r && function(e) {
            n.d(t, e, function() {
                return i[e];
            });
        }(r);
        t.default = o.a;
    },
    a84c: function(e, t, n) {
        "use strict";
        (function(e) {
            Object.defineProperty(t, "__esModule", {
                value: !0
            }), t.default = void 0;
            var i = n("e789"), o = {
                data: function() {
                    return {
                        winHeight: 400,
                        orderId: 0,
                        ordertid: 0,
                        orderDetail: {},
                        addressDetail: {},
                        latlng: [],
                        grade: 0,
                        grade_remarks: "",
                        isRes: !1,
                        refundAction: !1,
                        refundPrice: 0,
                        maxrefundPrice: 0,
                        refundCredit: 0,
                        maxrefundCredit: 0,
                        refundReason: "",
                        graceFullLoading: !0,
                        show: !1,
                        goodsSelectList: [],
                        finishBtn: 1,
                        orderColor: [],
                        transtyle: [ {
                            name: "快递",
                            value: "0",
                            checked: !0
                        }, {
                            name: "客户自提",
                            value: "1",
                            checked: !1
                        } ],
                        selctTran: 0,
                        trancom: "",
                        tranid: "",
                        remarks: "",
                        shop: {},
                        showBack: !1
                    };
                },
                onLoad: function(e) {
                    var t = getCurrentPages();
                    this.showBack = t.length > 1, this.orderId = e.oid, this.detailData();
                },
                onShow: function() {
                    var t = this;
                    e.$once("selectDateTime", function(e) {
                        t.orderDetail.mydate = e.orderDate + " " + e.orderTime;
                    });
                },
                methods: {
                    changeTrans: function(e) {
                        this.selctTran = e;
                    },
                    showDialog1: function() {
                        this.refundAction = !0, this.$refs.graceDialog1.open();
                    },
                    closeDialog1: function() {
                        this.refundAction = !1, this.$refs.graceDialog1.hide();
                    },
                    showDialog2: function() {
                        this.refundAction = !0, this.$refs.graceDialog2.open();
                    },
                    closeDialog2: function() {
                        this.refundAction = !1, this.$refs.graceDialog2.hide();
                    },
                    toUrl: function() {
                        wx.navigateToMiniProgram({
                            appId: "wx6885acbedba59c14",
                            path: "pages/result/result?nu=" + this.orderDetail.tranid + "&com=&querysource=third_xcx",
                            fail: function(t) {
                                e.showToast({
                                    title: "无法打开小程序",
                                    mark: !0,
                                    icon: "none",
                                    duration: 1200
                                });
                            }
                        });
                    },
                    refuse: function() {
                        var t = this;
                        this.refundAction = !0, e.showModal({
                            title: "提示",
                            content: "拒绝客户退款吗",
                            success: function(n) {
                                if (n.confirm) {
                                    e.showLoading({
                                        title: "提交中",
                                        mask: !0
                                    });
                                    var i = t.$xSign.sign("u8admincreditrefund");
                                    t.$xRequest.request({
                                        url: "entry/wxapp/u8admincreditrefund",
                                        data: {
                                            op: "refuse",
                                            oid: t.orderId,
                                            xgsign: i
                                        },
                                        success: function(n) {
                                            e.showToast({
                                                title: n.data.message,
                                                icon: "none"
                                            }), setTimeout(function() {
                                                t.detailData();
                                            }, 800);
                                        },
                                        fail: function(n) {
                                            e.showToast({
                                                title: n.data.message,
                                                icon: "none"
                                            }), setTimeout(function() {
                                                t.detailData();
                                            }, 800);
                                        },
                                        complete: function() {
                                            t.refundAction = !1, e.setStorageSync("credittoadmin", 1), e.hideLoading();
                                        }
                                    });
                                } else n.cancel && (t.refundAction = !1, console.log("取消"));
                            }
                        });
                    },
                    refundPay: function() {
                        var t = this, n = /(^[1-9](\d+)?(\.\d{1,2})?$)|(^0$)|(^\d\.\d{1,2}$)/;
                        !this.refundPrice || n.test(this.refundPrice) ? !this.refundCredit || n.test(this.refundCredit) ? this.refundPrice > this.maxrefundPrice ? e.showToast({
                            title: "金额不能超过" + this.maxrefundPrice,
                            icon: "none"
                        }) : this.refundCredit > this.maxrefundCredit ? e.showToast({
                            title: "积分不能超过" + this.maxrefundCredit,
                            icon: "none"
                        }) : 0 != this.refundCredit || 0 != this.refundPrice ? this.refundPrice < 0 || this.refundCredit < 0 ? e.showToast({
                            title: "金额或者积分不能小于0",
                            icon: "none"
                        }) : (this.refundAction = !0, e.showModal({
                            title: "提示",
                            content: "确定给客户退款吗?",
                            success: function(n) {
                                if (n.confirm) {
                                    e.showLoading({
                                        title: "提交中",
                                        mask: !0
                                    });
                                    var i = t.$xSign.sign("u8admincreditrefund");
                                    t.$xRequest.request({
                                        url: "entry/wxapp/u8admincreditrefund",
                                        data: {
                                            op: "refund",
                                            oid: t.orderId,
                                            refundPrice: t.refundPrice,
                                            refundCredit: t.refundCredit,
                                            reason: t.refundReason,
                                            xgsign: i
                                        },
                                        success: function(n) {
                                            e.hideLoading(), t.$refs.graceDialog1.hide(), e.showToast({
                                                title: n.data.message,
                                                icon: "none"
                                            }), setTimeout(function() {
                                                t.refundAction = !1, t.detailData();
                                            }, 800);
                                        },
                                        fail: function(n) {
                                            e.hideLoading(), t.$refs.graceDialog1.hide(), e.showToast({
                                                title: n.data.message,
                                                icon: "none"
                                            }), setTimeout(function() {
                                                t.refundAction = !1, t.detailData();
                                            }, 800);
                                        },
                                        complete: function() {
                                            e.setStorageSync("credittoadmin", 1);
                                        }
                                    });
                                } else n.cancel && (t.refundAction = !1, console.log("取消"));
                            }
                        })) : e.showToast({
                            title: "金额或者积分不能都为0",
                            icon: "none"
                        }) : e.showToast({
                            title: "积分格式不正确",
                            icon: "none"
                        }) : e.showToast({
                            title: "金额格式不正确",
                            icon: "none"
                        });
                    },
                    finishOrder: function() {
                        var t = this;
                        e.showModal({
                            title: "提示",
                            content: "确认提交吗？",
                            success: function(n) {
                                if (n.confirm) {
                                    t.$refs.graceDialog2.hide(), e.showLoading({
                                        title: "提交中"
                                    });
                                    var i = t.$xSign.sign("u8admincreditdetail");
                                    t.$xRequest.request({
                                        url: "entry/wxapp/u8admincreditdetail",
                                        data: {
                                            oid: t.orderId,
                                            trancom: t.trancom,
                                            tranid: t.tranid,
                                            remarks: t.remarks,
                                            transtyle: t.selctTran,
                                            op: "send",
                                            xgsign: i
                                        },
                                        success: function(n) {
                                            e.hideLoading(), t.refundAction = !1, 0 == n.data.errno && (e.showToast({
                                                title: n.data.message,
                                                icon: "none",
                                                duration: 1200
                                            }), t.detailData());
                                        },
                                        fail: function(n) {
                                            e.hideLoading(), t.refundAction = !1, e.showToast({
                                                title: n.data.message,
                                                icon: "none",
                                                duration: 1200
                                            }), t.detailData();
                                        },
                                        complete: function() {
                                            e.setStorageSync("credittoadmin", 1);
                                        }
                                    });
                                } else n.cancel && (console.log("用户点击取消"), e.hideLoading(), t.refundAction = !1);
                            }
                        });
                    },
                    showImgs: function(t) {
                        e.previewImage({
                            urls: t
                        });
                    },
                    detailData: function() {
                        var t = this;
                        this.graceFullLoading = !0;
                        var n = this.$xSign.sign("u8admincreditdetail");
                        this.$xRequest.request({
                            url: "entry/wxapp/u8admincreditdetail",
                            data: {
                                oid: this.orderId,
                                op: "detail",
                                xgsign: n
                            },
                            success: function(e) {
                                var n = JSON.parse(t.$Decrypt(e.data.data));
                                t.graceFullLoading = !1, t.goodsSelectList = n.goodslist, t.orderDetail = n.order, 
                                t.ordertid = n.order.ordertid.substring(4), t.addressDetail = n.addressDetail, t.orderColor = n.orderColor, 
                                t.selctTran = n.selctTran, t.trancom = "null" != n.order.trancom ? n.order.trancom : "", 
                                t.tranid = "null" != n.order.tranid ? n.order.tranid : "", t.remarks = "null" != n.order.remarks ? n.order.remarks : "", 
                                t.refundPrice = n.refundprice, t.maxrefundPrice = n.refundprice, t.refundCredit = n.refundCredit, 
                                t.maxrefundCredit = n.refundCredit, t.shop = n.shopinfo, 0 == n.selctTran ? t.transtyle = [ {
                                    name: "快递",
                                    value: "0",
                                    checked: !0
                                }, {
                                    name: "客户自提",
                                    value: "1",
                                    checked: !1
                                } ] : t.transtyle = [ {
                                    name: "快递",
                                    value: "0",
                                    checked: !1
                                }, {
                                    name: "客户自提",
                                    value: "1",
                                    checked: !0
                                } ];
                            },
                            fail: function(t) {
                                e.showToast({
                                    title: t.data.message,
                                    icon: "none",
                                    mask: !0,
                                    success: function() {
                                        e.setStorageSync("credittoadmin", 1), setTimeout(function() {
                                            e.navigateBack({
                                                delta: 1
                                            });
                                        }, 1800);
                                    }
                                });
                            }
                        });
                    },
                    dateToStr: function(e) {
                        var t = 1e3 * parseInt(e), n = new Date(t);
                        return n.getUTCFullYear() + "-" + (n.getUTCMonth() + 1) + "-" + n.getUTCDate() + " " + n.getHours() + ":" + n.getMinutes() + ":" + n.getSeconds();
                    },
                    copyId: function(t) {
                        e.setClipboardData({
                            data: t,
                            success: function() {
                                console.log("success");
                            }
                        });
                    },
                    getMap: function() {
                        var t = this.addressDetail.city.split(",");
                        if ("" == t[0]) {
                            var n = "https://restapi.amap.com/v3/geocode/geo?address=" + this.addressDetail.province + "&key=299f550ad4bc5c1860f455ccb27e8645";
                            i.get(n, {
                                m: "getJson"
                            }, function(n) {
                                if (1 == n.status && 0 != n.count) {
                                    var i = n.geocodes[0].location.split(",");
                                    t[0] = i[1], t[1] = i[0], e.openLocation({
                                        latitude: Number(t[0]),
                                        longitude: Number(t[1]),
                                        success: function() {
                                            console.log("success");
                                        }
                                    });
                                } else e.showModal({
                                    title: "温馨提示",
                                    content: "地址错误，请联系客服或者客户",
                                    showCancel: !1,
                                    success: function(t) {
                                        t.confirm && e.navigateBack({
                                            delta: 1
                                        });
                                    }
                                });
                            });
                        } else e.openLocation({
                            latitude: Number(t[0]),
                            longitude: Number(t[1]),
                            success: function() {
                                console.log("success");
                            }
                        });
                    }
                },
                computed: {
                    styleHeight: function() {
                        var t = this.$systemInfo.info(), n = t.windowHeight - t.iPhoneXBottomHeightPx - t.statusBarHeight - 45 - e.upx2px(100);
                        return "height:".concat(n, "px;");
                    }
                }
            };
            t.default = o;
        }).call(this, n("543d").default);
    },
    ae9e: function(e, t, n) {
        "use strict";
        n.r(t);
        var i = n("f9d9"), o = n("a71b");
        for (var r in o) "default" !== r && function(e) {
            n.d(t, e, function() {
                return o[e];
            });
        }(r);
        n("d219");
        var a = n("f0c5"), d = Object(a.a)(o.default, i.b, i.c, !1, null, null, null, !1, i.a, void 0);
        t.default = d.exports;
    },
    d219: function(e, t, n) {
        "use strict";
        var i = n("e264");
        n.n(i).a;
    },
    e264: function(e, t, n) {},
    e8e0: function(e, t, n) {
        "use strict";
        (function(e) {
            function t(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            n("4e1e"), t(n("66fd")), e(t(n("ae9e")).default);
        }).call(this, n("543d").createPage);
    },
    f9d9: function(e, t, n) {
        "use strict";
        n.d(t, "b", function() {
            return o;
        }), n.d(t, "c", function() {
            return r;
        }), n.d(t, "a", function() {
            return i;
        });
        var i = {
            gracePage: function() {
                return n.e("graceUI/components/gracePage").then(n.bind(null, "1915"));
            },
            graceFullLoading: function() {
                return n.e("graceUI/components/graceFullLoading").then(n.bind(null, "7669"));
            },
            divider: function() {
                return n.e("components/divider/divider").then(n.bind(null, "bdb7"));
            },
            graceDialog: function() {
                return n.e("graceUI/components/graceDialog").then(n.bind(null, "8d15"));
            },
            graceSelectTags: function() {
                return n.e("graceUI/components/graceSelectTags").then(n.bind(null, "1e05"));
            }
        }, o = function() {
            var e = this, t = (e.$createElement, e._self._c, e.orderDetail.paytime > 0 ? e.dateToStr(e.orderDetail.paytime) : null), n = e.orderDetail.dispatchtime > 0 ? e.dateToStr(e.orderDetail.dispatchtime) : null;
            e.$mp.data = Object.assign({}, {
                $root: {
                    m0: t,
                    m1: n
                }
            });
        }, r = [];
    }
}, [ [ "e8e0", "common/runtime", "common/vendor" ] ] ]);